﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EditWeightUI : EditScrollSelectUI
{
    int defaultIndex = 0;
    public override void Start()
    {
        int maxValue = 120;
        int minValue = 40;
        int index = 0;
        string[] heightStrs = new string[maxValue - minValue + 1];
        for (int i = maxValue; i >= minValue; i--)
        {
            heightStrs[index] = i + "kg";

            bool isMan = MGame.instance.MUser.userInfo.gender == Gender.man;
            if (isMan && i == 60 || !isMan && i == 50)
                defaultIndex = index;

            index++;
        }
        values = heightStrs;
        scrollSelectUI.Init(values);

        this.scrollSelectUI.listManagerVertical.ShowIndex(defaultIndex);
    }
    public override void OnEnable()
    {
        base.OnEnable();

        this.scrollSelectUI.listManagerVertical.ShowIndex(defaultIndex);
    }

    // Update is called once per frame
    void Update()
    {

    }
}